<template>
    <div class="cbox">
        <h4>子路由组件-路径参数</h4>
        <pre>{{ $route.params }}</pre>
        <input type="button" value="打印params参数" @click="printParams()">
    </div>
</template>

<script>
export default {
    methods:{
        printParams(){
            console.log( this.$route.params )
        }
    }
}
</script>

<!-- <script setup>
import { useRoute } from "vue-router";
const $route = useRoute();

function printParams(){
    console.log( $route.params )
}
</script> -->
